import request from '@/utils/request'

/**
 * 客户公海 公海列表
 * @param data
 * @returns
 */
export const seaList = (data: any) => {
  return request({
    url: '/scrm-api/console/customer/opensea/list',
    method: 'POST',
    data
  })
}

/**
 * 公海管理 删除客户公海
 * @param data
 * @returns
 */
 export const deleteData = (data: any) => {
  return request({
    url: '/scrm-api/console/customer/opensea/del',
    method: 'POST',
    data
  })
}

/**
 * 客户公海 客户列表
 * @param data
 * @returns
 */
export const customerList = (data: any) => {
  return request({
    url: '/scrm-api/console/customer/opensea/customer/list',
    method: 'POST',
    data
  })
}

/**
 * 客户公海 删除客户
 * @param data
 * @returns
 */
export const delData = (data: any) => {
  return request({
    url: '/scrm-api/console/customer/opensea/customer/del',
    method: 'POST',
    data
  })
}

/**
 * 客户公海 流转记录
 * @param data
 * @returns
 */
export const flowData = (data: any) => {
  return request({
    url: '/scrm-api/console/customer/opensea/customer/record',
    method: 'POST',
    data
  })
}

/**
 * 客户公海 导入记录
 * @param data
 * @returns
 */
export const exportDetail = (data: any) => {
  return request({
    url: '/scrm-api/console/customer/opensea/import/list',
    method: 'POST',
    data
  })
}

/**
 * 客户公海 导入记录 失败详情
 * @param data
 * @returns
 */
export const failDetail = (data: any) => {
  return request({
    url: '/scrm-api/console/customer/opensea/import/detail',
    method: 'POST',
    data
  })
}

/**
 * 客户公海 获取创建企业客户表单
 * @param data
 * @returns
 */
export const getCompanyCustomerForm = (data: any) => {
  return request({
    url: '/scrm-api/console/customer/create-corp-attr/list',
    method: 'GET',
    params: data
  })
}

/**
 * 客户公海 获取企业客户详情
 * @param data
 * @returns
 */
export const getCompanyCustomerDetail = (data: any) => {
  return request({
    url: '/scrm-api/console/customer/corp-cust/info',
    method: 'GET',
    params: data
  })
}

/**
 * 客户公海 添加企业客户
 * @param data
 * @returns
 */
export const addCompanyCustomer = (data: any) => {
  return request({
    url: '/scrm-api/console/customer/corp-cust-add',
    method: 'POST',
    data
  })
}

/**
 * 客户公海 编辑企业客户
 * @param data
 * @returns
 */
export const aditCompanyCustomer = (data: any) => {
  return request({
    url: '/scrm-api/console/customer/corp-cust-edit',
    method: 'POST',
    data
  })
}

/**
 * 客户公海 申请协助人
 * @param data
 * @returns
 */
 export const applyCompanyHelper = (data: any) => {
  return request({
    url: '/scrm-api/console/customer/apply-helper',
    method: 'POST',
    data
  })
}


/**
 * 公海管理 新建客户公海
 * @param data
 * @returns
 */
 export const addCustomerSea = (data: any) => {
  return request({
    url: '/scrm-api/console/customer/opensea/add',
    method: 'POST',
    data
  })
}

/**
 * 公海管理 编辑客户公海
 * @param data
 * @returns
 */
 export const editCustomerSea = (data: any) => {
  return request({
    url: '/scrm-api/console/customer/opensea/edit',
    method: 'POST',
    data
  })
}

/**
 * 公海管理 查询客户公海详情
 * @param data
 * @returns
 */
 export const checkCustomerSeaDetail = (data: any) => {
  return request({
    url: '/scrm-api/console/customer/opensea/info',
    method: 'POST',
    data
  })
}

/**
 * 客户公海 获取创建个人客户表单
 * @param data
 * @returns
 */
 export const getPersonCustomerForm = (data: any) => {
  return request({
    url: '/scrm-api/console/customer/cust-attr/list',
    method: 'GET',
    params: data
  })
}

//获取最近选择公海信息
export const lastRecord = (data: any) => {
  return request({
    url: '/scrm-api/console/common/last-record',
    method: 'GET',
    params: data
  })
}